package ophiux.wechatpay.sdk.util;

/**
 * 常量
 */
public class WechatPayConstants {

    public static final String DOMAIN_API = "https://api.mch.weixin.qq.com";
    public static final String DOMAIN_API2 = "https://api2.mch.weixin.qq.com";
    public static final String DOMAIN_APIHK = "https://apihk.mch.weixin.qq.com";
    public static final String DOMAIN_APIUS = "https://apius.mch.weixin.qq.com";
    
    //请求地址  一般使用 ：https://api.mch.weixin.qq.com
    /** 撤销订单 */
    public static final String URL_REVERSE		= "/secapi/pay/reverse";
    /** 提交刷卡支付 */
    public static final String URL_MICROPAY		= "/pay/micropay";
    /** 授权码查询openid */
    public static final String URL_AUTHCODETOOPENID= "/tools/authcodetoopenid";
    /** 统一下单 */
    public static final String URL_UNIFIEDORDER	= "/pay/unifiedorder";
    /** 查询订单 */
    public static final String URL_ORDERQUERY	= "/pay/orderquery";
    /** 关闭订单 */
    public static final String URL_CLOSEORDER   = "/pay/closeorder";
    /** 申请退款 */
    public static final String URL_REFUND 		= "/secapi/pay/refund";
    /** 查询退款 */
    public static final String URL_REFUNDQUERY  = "/pay/refundquery";
    /** 下载对账单 */
    public static final String URL_DOWNLOADBILL = "/pay/downloadbill";
    /** 交易保障 */
    public static final String URL_REPORT		= "/payitil/report";
    /** 交易保障 */
    public static final String URL_SHORTURL		= "/tools/shorturl";


    public static final String FAIL     = "FAIL";
    public static final String SUCCESS  = "SUCCESS";
    
    //签名类型    sign_type	 常量
    public static final String SIGN_TYPE_HMACSHA256 = "HMAC-SHA256";
    public static final String SIGN_TYPE_MD5 = "MD5";

    public static final String FIELD_SIGN = "sign";
    public static final String FIELD_SIGN_TYPE = "sign_type";
    
    //货币类型
    /** 人民币  */
    public static final String FEE_TYPE_CNY="CNY";
    
    
    //支付方式常量
    /** 公众号支付  */
    public static final String TRADE_TYPE_JSAPI="JSAPI";
    /** 扫码支付  */
    public static final String TRADE_TYPE_NATIVE="NATIVE";
    /** APP支付   */
    public static final String TRADE_TYPE_APP="APP";
    /** H5支付   */
    public static final String TRADE_TYPE_MWEB="MWEB";
    /** 刷卡支付   */
    public static final String TRADE_TYPE_MICROPAY="MICROPAY";
    
    
    
    //账单类型
    /** 返回当日所有订单信息，默认值  */
    public static final String BILL_TYPE_ALL="ALL";
    /** 返回当日成功支付的订单  */
    public static final String BILL_TYPE_SUCCESS="SUCCESS";
    /** 返回当日退款订单  */
    public static final String BILL_TYPE_REFUND="REFUND";
    /** 返回当日充值退款订单（相比其他对账单多一栏“返还手续费”）  */
    public static final String BILL_TYPE_RECHARGE_REFUND="RECHARGE_REFUND";
    
    
    //错误代码
    /** 订单不存在 */
    public static final String ERR_CODE_ORDERNOTEXIST="ORDERNOTEXIST";
    /** 系统错误  */
    public static final String ERR_CODE_SYSTEMERROR="SYSTEMERROR";
    
    
    // sandbox
    public static final String SANDBOX_MICROPAY_URL_SUFFIX     = "/sandboxnew/pay/micropay";
    public static final String SANDBOX_UNIFIEDORDER_URL_SUFFIX = "/sandboxnew/pay/unifiedorder";
    public static final String SANDBOX_ORDERQUERY_URL_SUFFIX   = "/sandboxnew/pay/orderquery";
    public static final String SANDBOX_REVERSE_URL_SUFFIX      = "/sandboxnew/secapi/pay/reverse";
    public static final String SANDBOX_CLOSEORDER_URL_SUFFIX   = "/sandboxnew/pay/closeorder";
    public static final String SANDBOX_REFUND_URL_SUFFIX       = "/sandboxnew/secapi/pay/refund";
    public static final String SANDBOX_REFUNDQUERY_URL_SUFFIX  = "/sandboxnew/pay/refundquery";
    public static final String SANDBOX_DOWNLOADBILL_URL_SUFFIX = "/sandboxnew/pay/downloadbill";
    public static final String SANDBOX_REPORT_URL_SUFFIX       = "/sandboxnew/payitil/report";
    public static final String SANDBOX_SHORTURL_URL_SUFFIX     = "/sandboxnew/tools/shorturl";
    public static final String SANDBOX_AUTHCODETOOPENID_URL_SUFFIX = "/sandboxnew/tools/authcodetoopenid";

}

